const mongoose = require('mongoose');

//  创建出勤集合规则
const homeworkSchema = new mongoose.Schema({
    title: {
        type: String,
        required: true
    },
    content: {
        type: String,
        required: true
    },
    username: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "User"
    }    
});

const Homework = mongoose.model('Attendance', homeworkSchema);

module.exports = {
    Homework
}